function Animal(type){
    this.type=type||'dog'
}
let cat = new Animal('cat')
cat instanceof Animal

Object.prototype.toString.call(3)
// '[object Number]'
Object.prototype.toString.call('')
// '[object String]'
Object.prototype.toString.call([])
// '[object Array]'
Object.prototype.toString.call({})
// '[object Object]'
Object.prototype.toString.call(null)
// '[object Null]'
Object.prototype.toString.call(undefined)
// '[object Undefined]'
Object.prototype.toString.call()
// '[object Undefined]'